package method

import (
	"net/http"
	"server/biz"
	"server/service"
)

func Order_Txt(md *service.Meta, w http.ResponseWriter) {
	id := md.Get("id").Int()
	if id == 0 {
		return
	}
	w.Header().Set("Content-Type", "text/plain;charset=UTF-8")
	o := biz.GetOrder(id)
	if o == nil {
		return
	}
	s := biz.GenerateOrderTxt(o)
	w.Write([]byte(s))
}
